﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace 用户登录
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void BTNClare_Click(object sender, EventArgs e)
        {
            TBoxName.Clear();
            TBoxPass.Clear();
            TBoxName.Focus();
        }

        private void BTNLogin_Click(object sender, EventArgs e)
        {
            if ((TBoxName.Text.Equals("admin"))&&(TBoxPass.Text.Equals("admin")))
            {
                MessageBox.Show("登录成功。。。", "提示");
                TBoxName.Clear();
                TBoxPass.Clear();
                TBoxName.Focus();
            }
            else
            {
                MessageBox.Show("登录失败，重新输入用户名和密码！", "提示");
                TBoxName.Clear();
                TBoxPass.Clear();
                TBoxName.Focus();
            }
        }
    }
}
